home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d890.lha
/
FileRexx
/
RequestFile.ttx
< prev
next >
Wrap
Text File
|
1993-07-16
|
3KB
|
139 lines
/**
** RequestFile.ttx
**
** I've made fixed definitions for the port-name of FileRexx, and also for
** the file-pattern, the Filerequester should use for displaying.
**
** In order to get FileRexx started by this script, the program has to be
** in the system-path, or you have to specify the full path.
**
** $VER: RequestFile.ttx 2.0 (Sunday 25 Apr 1993)
**/
OPTIONS RESULTS
/* Start FileRexx if it is not already running */
IF ~SHOW('P','FILEREXX') THEN
ADDRESS COMMAND 'Run <NIL: >NIL: FileRexx REXXHOST'
ARG tool
GetFilePath
name = result
SELECT
WHEN tool = "LOAD" THEN DO
ADDRESS FILEREXX
'GetFile TITLE="Open File..." FILE='||name
ADDRESS
IF Result~="" THEN OpenFile Result
END
WHEN tool = "NEWDOC" THEN DO
OpenDoc
GetPort '""'
ADDRESS (Result)
ADDRESS FILEREXX
'GetFile TITLE="Open File..." FILE='||name
ADDRESS
IF Result~="" THEN OpenFile Result
END
WHEN tool = "NEWDEF" THEN DO
name = "S:Support/TTX_Startup.dfn"
ADDRESS FILEREXX
'GetFile PAT=#?.dfn TITLE="Select new Definition-File..." FILE='||name
ADDRESS
IF Result~="" THEN OpenDefinitions Result
END
WHEN tool = "EXEMAC" THEN DO
name = "REXX:Documentize.ttx"
ADDRESS FILEREXX
'GetFile PAT=#?.ttx TITLE="Execute an ARexxMacro..." FILE='||name
ADDRESS
IF Result~="" THEN ExecARexxMacro Result
END
WHEN tool = "NEWMAC" THEN DO
name = "S:Macros/"
ADDRESS FILEREXX
'GetFile PAT=#?.mac TITLE="Open an Macro-File..." FILE='||name
ADDRESS
IF Result~="" THEN OpenMacro Result
END
WHEN tool = "SAVMAC" THEN DO
name = "S:Macros/"
ADDRESS FILEREXX
'GetFileSave PAT=#?.mac TITLE="Save an Macro-File..." FILE='||name
ADDRESS
IF Result~="" THEN SaveMacro Result
END
WHEN tool = "NEWPRF" THEN DO
name = "S:Support/TTX_Startup.prf"
ADDRESS FILEREXX
'GetFile PAT=#?.prf TITLE="Open an Prefs-File..." FILE='||name
ADDRESS
IF Result~="" THEN OpenPrefs Result
END
WHEN tool = "SAVPRF" THEN DO
name = "S:Support/TTX_Startup.prf"
ADDRESS FILEREXX
'GetFileSave PAT=#?.prf TITLE="Save an Prefs-File..." FILE='||name
ADDRESS
IF Result~="" THEN SavePrefs Result
END
WHEN tool = "INSERT" THEN DO
ADDRESS FILEREXX
'GetFile TITLE="Select File to insert..." FILE='||name
ADDRESS
IF Result~="" THEN DO
OpenClip Result
IF RC = 0 THEN PasteClip
END
END
WHEN tool = "SAVCLP" THEN DO
name = "RAM:TTX_Clip.con"
ADDRESS FILEREXX
'GetFileSave TITLE="Save Clip as..." FILE='||name
ADDRESS
IF Result~="" THEN SaveClip "NOBACKUP" Result
END
WHEN tool = "SAVE" THEN DO
IF (fileName ~= "") THEN DO
SaveFile
EXIT
END
ADDRESS FILEREXX
'GetFileSave TITLE="Save File..." FILE='||name
ADDRESS
IF Result~="" THEN DO
SetFilePath Result
SaveFile
END
END
WHEN tool = "SAVEAS" THEN DO
ADDRESS FILEREXX
'GetFileSave TITLE="Save File As..." FILE='||name
ADDRESS
IF Result~="" THEN DO
SetFilePath Result
SaveFile
END
END
OTHERWISE DO
BeepScreen
RequestBool "Error:" "Syntax Error!"
EXIT
END
END